-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Max_vcpus_topology: ensure that the VM gets correct topology with maximum vcpus #5913
Conversation
ec54a0e
to
e5c01c1
Compare
53fab07
to
8a20b8e
Compare
elif (str(cores * clusters) != lscpu_output["Core(s) per socket"]): | ||
test.fail(lscpu_check_fail + "core(s) per socket") | ||
|
||
session = vm.wait_for_login() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you reuse the vm session created in L157?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had it in this order with the session recreated because in the automation case, lscpu was checked before the others and cpuutil.get_cpu_info(session) automatically runs session.close(). However, the order of these checks shouldn't matter so I moved the lscpu check to the end so that 1 session can be used. I still include the session.close() cmd at the end just in case (but this can be removed if we don't want redundancy).
|
||
lscpu_check_fail = "The configured topology is not consistent with the lscpu output within the vm for " | ||
if (str(vcpus_num) != lscpu_output["CPU(s)"]): | ||
test.fail(lscpu_check_fail + "CPU(s)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if 'lscpu_output' or the actual CPU(s) and other items below will be logged for further debugging or not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whenever I run the test, I get the following in the debug log because of running the cpuutil.get_cpu_info(session), so the output of lscpu is shown:
2024-10-08 13:51:17,815 cpu L0941 INFO | output is ['Architecture: aarch64', 'CPU op-mode(s): 32-bit, 64-bit', 'Byte Order: Little Endian', 'CPU(s): 128', 'On-line CPU(s) list: 0-127', 'Vendor ID: ARM', 'BIOS Vendor ID: Red Hat', 'Model name: Neoverse-N1', 'BIOS Model name: RHEL 10.0.0 ARM Virtual Machine CPU @ 2.0GHz', 'BIOS CPU family: 1', 'Model: 1', 'Thread(s) per core: 1', 'Core(s) per socket: 1', 'Socket(s): 128', 'Stepping: r3p1', 'BogoMIPS: 50.00', 'Flags: fp asimd evtstrm aes pmull sha1 sha2 crc32 atomics fphp asimdhp cpuid asimdrdm lrcpc dcpop asimddp', 'NUMA node(s): 1', 'NUMA node0 CPU(s): 0-127', 'Vulnerability Gather data sampling: Not affected', 'Vulnerability Itlb multihit: Not affected', 'Vulnerability L1tf: Not affected', 'Vulnerability Mds: Not affected', 'Vulnerability Meltdown: Not affected', 'Vulnerability Mmio stale data: Not affected', 'Vulnerability Reg file data sampling: Not affected', 'Vulnerability Retbleed: Not affected', 'Vulnerability Spec rstack overflow: Not affected', 'Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl', 'Vulnerability Spectre v1: Mitigation; __user pointer sanitization', 'Vulnerability Spectre v2: Mitigation; CSV2, BHB', 'Vulnerability Srbds: Not affected', 'Vulnerability Tsx async abort: Not affected']
4eee7d1
to
31502e8
Compare
36698ba
to
86b53f5
Compare
An updated passing test log:
|
86b53f5
to
e6cd774
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@@ -0,0 +1,28 @@ | |||
- vcpu.max_topology: | |||
type = vcpu_max_topology | |||
memory = 4000000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liang-cong-red-hat hi lcong,do you think this memory num meets customer usage scenarios, do we need to give the Multiples of 1024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is KiB, we'd better align it to MiB, otherwise libvirt will help to align. Then we are not able to check it's value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to 4194304, a multiple of 1024
e6cd774
to
10ed26a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Case ID: VIRT-301882
Automates the case that verifies the vm can start with vcpus which is equal to host online cpu number and vm topology is consistent to those configured.
Depends on:
Scenarios + sub-scenarios considered:
Evidence of tests passing: